Package-level declarations

Contains all classes/methods related to User Accounts mainly UI focused exce

Types

Link copied to clipboard
interface AccountService

Interface defining the various authentication and account management services.

Link copied to clipboard
@Singleton
class AccountServiceImplementation @Inject constructor(firebaseAuth: FirebaseAuth, firestore: FirebaseFirestore) : AccountService

Implementation of AccountService that interacts with Firebase for user authentication and account management.

Link copied to clipboard
@Module
abstract class AccountServiceModule

Dagger Hilt module to bind the AccountServiceImplementation to AccountService.

Link copied to clipboard
data class AccountUiState(val isLoggedIn: Boolean = false, val email: String = "default_initial", val displayName: String = "default_initial")

Represents the UI state for the user's account.

Link copied to clipboard
class AccountViewModel @Inject constructor(userRepository: UserRepository, accountService: AccountService) : ViewModel

ViewModel responsible for managing user account state and authentication status. It listens for authentication state changes and provides relevant user data.

Link copied to clipboard
sealed class AuthState

Represents the authentication state of the user

Link copied to clipboard
@Module
object FireBaseModule

Dagger Hilt module to provide Firebase-related dependencies.

Link copied to clipboard
data class LoginUiState(val email: String = "", val password: String = "")

Represents the UI state for the login screen.

Link copied to clipboard
class LoginViewModel @Inject constructor(userRepository: UserRepository, accountService: AccountService) : ViewModel

ViewModel responsible for managing the login process. Handles user authentication and UI state updates.

Link copied to clipboard
data class SignupUiState(val email: String = "", val password: String = "", val password_: String = "")

Represents the UI state for the signup screen.

Link copied to clipboard
class SignupViewModel @Inject constructor(userRepository: UserRepository, accountService: AccountService) : ViewModel

ViewModel responsible for managing the signup process. Handles account creation and UI state updates.

Functions

Link copied to clipboard
fun AccountScreen(modifier: Modifier = Modifier, viewModel: AccountViewModel = hiltViewModel(), openDrawer: () -> Unit, onLogoutResult: () -> Unit)

Composable function for the Account screen, where users can view their account information and log out.

Link copied to clipboard
fun LoginScreen(modifier: Modifier = Modifier, viewModel: LoginViewModel = hiltViewModel(), openDrawer: () -> Unit, onLoginResult: () -> Unit, onNavigateToSignUp: () -> Unit)

Composable function for the Login screen that handles the layout and actions for user login and navigation to the sign-up screen.

Link copied to clipboard
fun SignUpScreen(modifier: Modifier = Modifier, viewModel: SignupViewModel = hiltViewModel(), openDrawer: () -> Unit, onSignUpResult: () -> Unit)

Composable function representing the Sign Up screen.